package com.shuda.business.data.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 数据处理引擎DTO类
 */
@Data
@Schema(name = "DataProcessingEngineDTO", description = "数据处理引擎DTO")
public class DataProcessingEngineDTO {

    @Schema(description = "配置ID")
    private Long id;

    @Schema(description = "渠道ID")
    private Long channelId;

    @Schema(description = "渠道名称")
    private String channelName;

    @Schema(description = "配置类型(field_mapping-字段映射,script-脚本配置)")
    private String configType;

    @Schema(description = "源字段名")
    private String sourceField;

    @Schema(description = "目标字段名")
    private String targetField;

    @Schema(description = "字段映射规则(JSON)")
    private String mappingRule;

    @Schema(description = "转换脚本")
    private String transformScript;

    @Schema(description = "脚本语言(javascript-groovy,python)")
    private String scriptLanguage;

    @Schema(description = "配置状态(enabled-启用,disabled-禁用)")
    private String configStatus;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}